<template>
	<view class="control">
		<view>
			<view class="item" v-for="(item , index) in venuelist" :key="index">
				<view class="top">
					<view class="header flex-between">
						<view class="flex-align">
							<!-- <view class="name">骏熙泰羽</view> -->
						</view>
						<view class="flex-align">
							<view class="new" v-if="item.isread == 0"></view>
							<view class="timer">
								{{item.date}}
							</view>
						</view>
					</view>
					<view class="con">
						<view class="notice-title">{{item.name}}</view>
						<view class="detail">
							{{item.simpleContent}}
						</view>
					</view>
				</view>
				<view class="bottom flex-between" @click="openDetail(item)">
					<view class="info">查看详情</view>
					<u-icon name="arrow-right" color="#e4e4e4" size="18"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const index = require('@/api/index/index.js')
	export default {
		data() {
			return {
				venuelist:[],
				
			}
		},
		onLoad() {
			let that = this
			that.venueTrends()
		},
		onShow() {
			let that = this
			that.venueTrends()
		},
		methods: {
			async venueTrends() {
				let that = this
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync("openid"),
					id:''
				}
				let result = await index.venueTrends(data)
				if (result.code == 1) {
					this.venuelist = result.data.result
				}
			},
			openDetail(item){
				uni.navigateTo({
					url:'/pages/index/notice/noticeDetail?id=' + item.id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.control{
		width: 100%;
		min-height: 100vh;
		padding: 30rpx 30rpx;
		box-sizing: border-box;
		background-color:#f3f3f3;
		.item{
			background-color: #ffffff;
			border-radius: 15rpx;
			margin-bottom: 30rpx;
			&:last-of-type{
				margin-bottom: 0;
			}
			.top{
				padding: 20rpx 30rpx;
				padding-bottom: 25rpx;
				box-sizing: border-box;
				border-bottom: 1px solid #f7f7f7;
				.header{
					margin-bottom: 20rpx;
					.name{
						font-size: 28rpx;
					}
					.timer{
						font-size: 24rpx;
						color: #b2b2b2;
					}
					.new{
						width: 24rpx;
						height: 24rpx;
						border-radius: 50%;
						margin-right: 20rpx;
						background-color: #f63043;
					}
				}
				.con{
					.notice-title{
						font-weight: 700;
						font-size: 28rpx;
						margin-bottom: 20rpx;
					}
					.detail{
						font-size: 26rpx;
						color: #8b8b8b;
					}
				}
			}
			.bottom{
				padding: 20rpx 30rpx;
				box-sizing: border-box;
				font-size: 28rpx;
			}
		}
	}
</style>
